home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CDsupport / Index < prev    next >
Text File  |  1997-08-08  |  980b  |  45 lines

  1. ; Searches the CD.index file for a specified string
  2.  
  3. set OutFile "RAM:CUCDindex"
  4.  
  5. Version >NIL: version 37
  6. if WARN
  7.     echo ""
  8.     echo "You need at least version 2.04 of the operating system to run SearchIndex"
  9.     quit
  10.     endif
  11.  
  12. set all `RequestChoice "Index search" "Search this CD or all CUCDs?" "This CD|All CDs|Cancel"`
  13. if $all EQ 0
  14.     quit
  15.     endif
  16.  
  17. unset str
  18. set str `:C/RequestString TITLE "Search CD Index" BODY "Please enter the string to search for"`
  19. get >NIL: str
  20. if WARN
  21.     quit
  22.     endif
  23.  
  24. :C/FlashFind :CDsupport/CUCD.index "$str" >$OutFile NOPREFS QUIET
  25. if $all EQ 2
  26.     :C/FlashFind :CDsupport/indices/#? "$str" >>$OutFile NOPREFS QUIET
  27.     endif
  28.  
  29. if `List $OutFile lformat "%B"` EQ "empty"
  30.     RequestChoice >NIL: "Index search" "No matches found for *"$str*"" "OK"
  31. else
  32.     Version >NIL: version 39
  33.     if WARN
  34.         AmigaGuide $OutFile
  35.     else
  36.         MultiView $OutFile
  37.         endif
  38.     endif
  39.  
  40. delete >NIL: $OutFile
  41. unset str
  42. unset all
  43. unset OutFile
  44.  
  45.